<?php
/**
 * 订单支付服务
 */

namespace polymerize\order\service;

use app\common\InstanceTrait;
use Exception;
use polymerize\order\module\pay\PayOrderQuery;
use polymerize\order\module\pay\PayVip;

class PayService
{
    use InstanceTrait;

    /**
     * 订单支付结果查询
     *
     * @param string $orderNo
     * @param int    $payType
     * @return array
     * @throws Exception
     */
    public function payOrderQuery(string $orderNo, int $payType): array
    {
        return PayOrderQuery::getInstance()->payOrderQuery($orderNo, $payType);
    }

    /**
     * VIP支付购买
     *
     * @param int    $uid
     * @param int    $osType
     * @param string $vipType
     * @param int    $payType
     * @param int    $disposableGoods
     * @return array
     */
    public function payVip(int $uid, int $osType, string $vipType, int $payType, int $disposableGoods): array
    {
        return PayVip::getInstance()->payVip($uid, $osType, $vipType, $payType, $disposableGoods);
    }

}